import request from '@/utils/request'

// 创建工艺信息
export function createProcess(data) {
  return request({
    url: '/mes/process/create',
    method: 'post',
    data: data
  })
}

// 更新工艺信息
export function updateProcess(data) {
  return request({
    url: '/mes/process/update',
    method: 'put',
    data: data
  })
}

// 删除工艺信息
export function deleteProcess(id) {
  return request({
    url: '/mes/process/delete?id=' + id,
    method: 'delete'
  })
}

// 获得工艺信息
export function getProcess(id) {
  return request({
    url: '/mes/process/get?id=' + id,
    method: 'get'
  })
}

// 获得工艺信息简单列表
export function getProcessSimple(query) {
  return request({
    url: '/mes/process/list-all-simple',
    method: 'get',
    params: query
  })
}

// 获得工艺信息分页
export function getProcessPage(query) {
  return request({
    url: '/mes/process/page',
    method: 'get',
    params: query
  })
}

// 导出工艺信息 Excel
export function exportProcessExcel(query) {
  return request({
    url: '/mes/process/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
